<template>
	<view class="">
		<u-navbar :is-back="false" :border-bottom="false" :background="{ background: '#fff' }">
			<view class="slot-wrap flex align-center">
				<text class="cuIcon-back" @click="Back"></text>
				鲁小班编程
			</view>
		</u-navbar>
		<view class="flex justify-between top">
			<view class="">
				<view class="u-font-28">
					许光帮填
				</view>
				<view class="u-font-24">
					手机登录
				</view>
			</view>
			<view class="right">
				更换账号<text class="cuIcon-right"></text>
			</view>
		</view>
		<view class="main">
			<view class="flex">
				<image src="../../static/images/banren.png" mode="aspectFill"></image>
				<view class="u-flex-1">
					<view class="u-font-30">
						中华墨坊画材介绍1~6节
					</view>
					<view class="u-font-24">
						购买后观看有效期至2022.05.12
					</view>
					<view class="u-font-28 text-right">
						￥29800.00
					</view>
					
				</view>
			</view>
			<view class="flex">
				<image src="../../static/images/banren.png" mode="aspectFill"></image>
				<view class="u-flex-1">
					<view class="u-font-30">
						中华墨坊画材介绍1~6节
					</view>
					<view class="u-font-24">
						购买后观看有效期至2022.05.12
					</view>
					<view class="u-font-28 text-right">
						￥29800.00
					</view>
					
				</view>
			</view>
			<view class="flex">
				<image src="../../static/images/banren.png" mode="aspectFill"></image>
				<view class="u-flex-1">
					<view class="u-font-30">
						中华墨坊画材介绍1~6节
					</view>
					<view class="u-font-24">
						购买后观看有效期至2022.05.12
					</view>
					<view class="u-font-28 text-right">
						￥29800.00
					</view>
					
				</view>
			</view>
			
		</view>
		<u-gap height="110"></u-gap>
		<view class="buoon u-flex justify-between">
			<view class="left u-font-28">
				实付金额: <text class="text-orange">￥29800.00</text>
			</view>
			<view class="cu-btn round bg-orange u-font-28" @click="multiRedirect('/pages/index/index&switch')">
				立即支付
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		onLoad() {

		},
		methods: {
			Back(){
				uni.navigateBack({
				});
			},
			//页面跳转
			multiRedirect(url) {
				if (url && url.length > 0) {
					console.log('+++++', url.indexOf('http'))
					if (url.indexOf('http') === 0) {
						// #ifdef H5 
						location.href = url
						// #endif
						// #ifdef MP-WEIXIN
						uni.navigateTo({
							url: '/pages/web/web?url=' + encodeURIComponent(url)
						})
						// #endif
						// #ifdef APP-PLUS
						plus.runtime.openURL(url, function(res) {
							console.log(res);
						});
						// #endif
					} else if (url.indexOf('&switch') > -1) {
						url = url.substring(0, url.indexOf('&switch'))
						console.log(3434, url)
						uni.switchTab({
							url: url
						})
					} else {
						console.log("挑起", url)
						uni.navigateTo({
							url
						})
					}
				}
			},
		}
	}
</script>

<style lang="scss">
	.top{
		padding: 30rpx 25rpx;
		.u-font-26{
			color: #666;
		}
		.u-font-24{
			margin-top: 15rpx;
			color: #999;
		}
		.right{
			color: #999;
		}
	}
	.main{
		.flex{
			padding: 30rpx 25rpx;
			background-color: #FFFFFF;
			image{
				width: 185rpx;
				height: 116rpx;
				border-radius: 6rpx;
				margin-right: 16rpx;
			}
			.u-font-30{
				color: #333;
			}
			.u-font-24{
				color: #666;
				margin: 10rpx 0;
			}
		}
		.flex+.flex{
			border-top: 2rpx solid #f2f2f2;
		}
	}
	
	.buoon{
		background-color: #FFFFFF;
		width: 100%;
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		margin: auto;
		padding: 15rpx;
		.left{
			padding-left: 10rpx;
		}
		.cu-btn{
			width: 328rpx;
			height: 80rpx;
			line-height: 80rpx;
			text-align: center;
			border-radius: 40rpx;
		}
	}
</style>
